<template>
	<view>
		<page title="修改资料">
			
			<scroll-view slot="top" scroll-x class="bg-white nav">
				<view class="flex text-center">
					<view class="cu-item flex-sub" :class="index==TabCur?'text-red cur':''" v-for="(item,index) in tabBars" :key="index"
					 @tap="tabSelect" :data-type="item.type" :data-id="index">
						{{item.name}}
					</view>
				</view>
			</scroll-view>
			
		</page>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				TabCur: 0,
				tabBars: [{
						name: 'TAB菜单1',
						type: 1
					},
					{
						name: 'TAB菜单1',
						type: 2
					}
				]
			}
		},
		methods: {
			// 切换选项卡
			tabSelect(e) {
				this.TabCur = e.currentTarget.dataset.id;
			},
		}
	}
</script>

<style>

</style>
